

#ifndef _BSP_CONFIG_H_
#define _BSP_CONFIG_H_

/*-------------------------------------------------------------------------
    FONT CHIP
-------------------------------------------------------------------------*/

#define GT20L16_SpiId		1


/*-------------------------------------------------------------------------
    SPI FLASH
-------------------------------------------------------------------------*/

#define W25_SpiId		1

/*-------------------------------------------------------------------------
    RFIO
-------------------------------------------------------------------------*/

#define RFIO_RST_GP		GPIOB
#define RFIO_RST_PIN	GPIO_PIN_1

#define RFIO_IRQ_GP		GPIOB
#define RFIO_IRQ_PIN	GPIO_PIN_0

#define RFIO_SpiId		0

/*-------------------------------------------------------------------------
    RS485
-------------------------------------------------------------------------*/

#define RS485_DIR_GP                   GPIOC
#define RS485_DIR_PIN                  GPIO_PIN_15

#define RS485_UartId			2


/*-------------------------------------------------------------------------
    USB
-------------------------------------------------------------------------*/

#define USB_PULLUP                      GPIOA
#define USB_PULLUP_PIN                  GPIO_PIN_15

#define USB_PULLUP_ENABLE			1

/*-------------------------------------------------------------------------
    BUZZER
-------------------------------------------------------------------------*/
#define BSP_IO_BUZZER_ENABLE		1
#define BSP_PWM_BUZZER_ENABLE		2

#define BSP_BUZZER_TYPE				BSP_IO_BUZZER_ENABLE

#if (BSP_BUZZER_TYPE == BSP_IO_BUZZER_ENABLE)
#define BUZ_GP		GPIOB
#define BUZ_PIN		GPIO_PIN_2
#endif 

/*-------------------------------------------------------------------------
   	PWM BUZZER
-------------------------------------------------------------------------*/


#if (BSP_BUZZER_TYPE == BSP_PWM_BUZZER_ENABLE)

#define BUZ_GP		GPIOB
#define BUZ_PIN		GPIO_PIN_2
#define BUZ_TIMER	TIMER1

#endif 

/*-------------------------------------------------------------------------
    LED
-------------------------------------------------------------------------*/
#define LED_R_GP	GPIOA
#define LED_R_PIN	GPIO_PIN_13

#define LED_G_GP	GPIOA
#define LED_G_PIN	GPIO_PIN_14

/*-------------------------------------------------------------------------
    SM16106
-------------------------------------------------------------------------*/

#define SM_SDI_GP	GPIOC
#define SM_SDI_PIN	GPIO_PIN_4

#define SM_CLK_GP	GPIOC
#define SM_CLK_PIN	GPIO_PIN_5

#define SM_LE_GP	GPIOC
#define SM_LE_PIN	GPIO_PIN_6

/*-------------------------------------------------------------------------
    WG
-------------------------------------------------------------------------*/

#define WG_D0_GP	GPIOB
#define WG_D0_PIN	GPIO_PIN_4

#define WG_D1_GP	GPIOB
#define WG_D1_PIN	GPIO_PIN_5

/*-------------------------------------------------------------------------
    RELAY
-------------------------------------------------------------------------*/
#define RELAY_GP		GPIOC
#define RELAY_PIN		GPIO_PIN_0


/*-------------------------------------------------------------------------
   	SIG
-------------------------------------------------------------------------*/
//LED线控
#define SIG_LED_GP		GPIOB
#define SIG_LED_PIN		GPIO_PIN_7
//蜂鸣器线控
#define SIG_BUZ_GP		GPIOB
#define SIG_BUZ_PIN		GPIO_PIN_6
//拆机检测
#define SIG_TAMP_GP		GPIOC
#define SIG_TAMP_PIN	GPIO_PIN_2
//WG26 检测
#define SIG_WG_GP		GPIOC
#define SIG_WG_PIN		GPIO_PIN_3

#endif


